#ifndef __ENTRY_H
#define __ENTRY_H
#include "validator.h"
#include "value.h"

typedef struct cconf_entry_s {
    char * path;
    char * value;
    char * def;
    cconf_validator_t * validator;
    char * docstring;
    struct cconf_entry_s * parent;
    struct cconf_entry_s ** children;
    int n_children;
} cconf_entry_t;

void cconf_entry_free(void * entry);

cconf_entry_t * 
cconf_entry_create(char * path, cconf_validator_t * val, char * doc, char * def, cconf_entry_t * par);

void cconf_entry_set_value(void * entry, char * value);
char * cconf_entry_get_value(void * entry);

char * cconf_entry_document(void * entry);
#endif
